Skip to content

Fix: Sort name incase of blank first/middle/sur-name#322

Open
jguegel wants to merge 2 commits intoFossifyOrg:mainfrom
jguegel:sort-name-195
Open

Fix: Sort name incase of blank first/middle/sur-name#322
jguegel wants to merge 2 commits intoFossifyOrg:mainfrom
jguegel:sort-name-195

Conversation

@jguegel
Copy link
Contributor

@jguegel jguegel commented Mar 7, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • Fixed in case of empty string name for sorting
  • Scenario I order by firstname, but i have contacts with only surname, currently they are added on the bottom of the list (even they are called AASurname)
  • New behavior:
  1. If order by firstname but firstname blank use surname (fixes the described issue)
  2. If order by middlename but middlename blank use firstname (because more likely firstname is available then middlename)
  3. If order by surname but surname blank use firstname (additional case)

Tests performed

  • unable to test since i couldn't get the library to run locally 👎

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

@jguegel jguegel requested a review from naveensingh as a code owner March 7, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When First Name starts with White Space, the card is Filed at the End, after Z

1 participant